package com.icexxx.ice_browser;

import java.awt.event.MouseListener;

import javax.swing.JButton;

public class ButtonManager {

    public static JButton createButton(String title) {
        JButton button = new JButton(title);
        button.setSize(300, 100);
        return button;
    }

    public static JButton createRequestCommitButton() {
        JButton button = new JButton("发送");
        button.setSize(300, 100);
        MouseListener mouseListener = EventManager.requestCommitButtonClick();
        button.addMouseListener(mouseListener);
        return button;
    }

    public static JButton createRequestAddressButton() {
        JButton button = new JButton("地址栏");
        button.setSize(300, 100);
        return button;
    }

    public static JButton createCopyContentButton() {
        JButton button = new JButton("复制内容");
        button.setSize(500, 100);
        MouseListener mouseListener = EventManager.copyContentButtonClick();
        button.addMouseListener(mouseListener);
        return button;
    }

    public static JButton createCopyUrlButton() {
        JButton button = new JButton("复制地址");
        button.setSize(300, 100);
        MouseListener mouseListener = EventManager.copyUrlButtonClick();
        button.addMouseListener(mouseListener);
        return button;
    }

    public static JButton createParseUrlButton() {
        JButton button = new JButton("粘贴地址");
        button.setSize(300, 100);
        MouseListener mouseListener = EventManager.parseUrlButtonClick();
        button.addMouseListener(mouseListener);
        return button;
    }

    public static JButton createRequestMethodButton() {
        JButton button = new JButton("请求方式");
        button.setSize(300, 100);
        return button;
    }

}
